<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var obj = { name: 'rose', age: 19 }
    var arr = Object.keys(obj) //  获取的是对象中的键,返回一个新的数组
    console.log(arr, 555);
    var arr2 = Object.values(obj) //  获取的是对象中的值,返回一个新的数组
    console.log(arr2, 444);
  </script>
</body>

</html>